package xiao.ke.sbdemo.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xiao.ke.sbdemo.model.JsonData;

/**
 * @Author XiaoKe
 * @Date 2020/9/6 21:39
 * @Description TODO
 */
@RestController
@RequestMapping("/api/v1")
public class LogController {

    private Logger logger = LoggerFactory.getLogger(this.getClass());


    @GetMapping("log")
    public Object testLog(){

        logger.debug("this is debug level");
        logger.info("this is info level ");
        logger.warn("this is warn level ");
        logger.error("this is error level");
        return JsonData.buildSuccess();
    }
}
